home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / _GUICtrlEditScroll.au3 < prev    next >
Text File  |  2007-09-08  |  2KB  |  43 lines

  1. #include <GUIConstants.au3>
  2. #include <GuiEdit.au3>
  3.  
  4. opt('MustDeclareVars', 1)
  5.  
  6. Dim $myedit, $msg, $Btn_linedown, $Btn_lineup, $Btn_pagedown, $Btn_pageup
  7.  
  8. GUICreate("Edit Scroll", 392, 254)
  9.  
  10. $myedit = GUICtrlCreateEdit("AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI." & @CRLF, 140, 32, 121, 97, BitOR($ES_AUTOVSCROLL, $WS_VSCROLL, $ES_MULTILINE, $WS_HSCROLL))
  11. GUICtrlSetLimit($myedit, 1500)
  12. $Btn_linedown = GUICtrlCreateButton("Line Down", 75, 140, 90, 30)
  13. $Btn_lineup = GUICtrlCreateButton("Line Up", 75, 180, 90, 30)
  14. $Btn_pagedown = GUICtrlCreateButton("Page Down", 190, 140, 90, 30)
  15. $Btn_pageup = GUICtrlCreateButton("Page Up", 190, 180, 90, 30)
  16.  
  17. ; will be append dont' forget 3rd parameter
  18. GUICtrlSetData($myedit, "It uses a combination of simulated keystrokes, mouse movement and window/control manipulation" & @CRLF & _
  19.       "in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript" & @CRLF & _ 
  20.       "and SendKeys)." & @CRLF & _ 
  21.       'AutoIt was initially designed for PC "roll out" situations to configure thousands of PCs, but with the' & @CRLF & _ 
  22.       "arrival of v3 it is also well suited to performing home automation and the scripting of repetitive" & @CRLF & _ 
  23.       "tasks." & @CRLF & @CRLF & "AutoIt can:" & @CRLF & @CRLF & "Execute Windows and DOS executables", 1)
  24.  
  25. GUISetState()
  26.  
  27. ; Run the GUI until the dialog is closed
  28. While 1
  29.    $msg = GUIGetMsg()
  30.    Select
  31.       Case $msg = $GUI_EVENT_CLOSE
  32.          ExitLoop
  33.       Case $msg = $Btn_linedown
  34.          _GUICtrlEditScroll ($myedit, $SB_LINEDOWN)
  35.       Case $msg = $Btn_lineup
  36.          _GUICtrlEditScroll ($myedit, $SB_LINEUP)
  37.       Case $msg = $Btn_pagedown
  38.          _GUICtrlEditScroll ($myedit, $SB_PAGEDOWN)
  39.       Case $msg = $Btn_pageup
  40.          _GUICtrlEditScroll ($myedit, $SB_PAGEUP)
  41.    EndSelect
  42. WEnd
  43.